package com.tuanzi.loan.business.service.compensation.impl;

import com.tuanzi.loan.business.repository.compensation.CompensationChildOrderRepository;
import com.tuanzi.loan.business.service.compensation.CompensationChildOrderService;
import com.tuanzi.loan.core.aspect.Debug;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.compensation.CompensationChildOrderRequest;
import com.tuanzi.loan.vo.response.compensation.CompensationChildOrderResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.retry.RetryException;
import org.springframework.retry.annotation.Retryable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author caiwanlin
 * @create 2019-02-13 11:46
 */
@Debug
@Service
@Transactional
@Retryable(value = {RetryException.class})
public class CompensationChildOrderServiceImpl implements CompensationChildOrderService {
    @Autowired
    private CompensationChildOrderRepository compensationChildOrderRepository;
    @Override
    public Page<CompensationChildOrderResponse> list(PageSearcher<CompensationChildOrderRequest> pageSearcher) {
        return compensationChildOrderRepository.list(pageSearcher.getSearchCondition(),pageSearcher.getPageable());
    }
}
